<template>
  <div class="store-detail-wrapper">
      <store-title-nav v-bind="store_data"></store-title-nav>
      <detail-tab :id="store_id"></detail-tab>
  </div>
</template>

<script>
import StoreTitleNav from "@/components/StoreTitleNav"
import DetailTab from "@/components/DetailTab"
import {StoreDetail} from "@/request/api"
export default {
    components: {
        StoreTitleNav,
        DetailTab
    },
    data(){
        return {
            store_id: null,
            store_data: null
        }
    },
    created(){
        this.store_id = this.$route.params.shopid;
        StoreDetail({
            shopId: this.store_id
        }).then(res => {
            if(res.status === 200){
                this.store_data = res.data;
            }
        });
    }
}
</script>

<style lang="less">
    .store-detail-wrapper{
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100%;
    }
</style>